<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="csrf-token" content="Vqg75bLQNpPRgST6cIVg6oBbGdT6BscJ3FLci3ej">
    <title>Admin  | 消费统计日报（金币）</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">


    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/css/style.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/js/lightbox2/css/lightbox.min.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/AdminLTE/plugins/iCheck/all.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/AdminLTE/plugins/colorpicker/bootstrap-colorpicker.min.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/flatpickr/dist/flatpickr.min.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/flatpickr/dist/shortcut-buttons-flatpickr/themes/light.min.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/bootstrap-fileinput/css/fileinput.min.css?v=4.5.2">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/AdminLTE/plugins/select2/select2.min.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/AdminLTE/plugins/ionslider/ion.rangeSlider.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/AdminLTE/plugins/ionslider/ion.rangeSlider.skinNice.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/fontawesome-iconpicker/dist/css/fontawesome-iconpicker.min.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/bootstrap-duallistbox/dist/bootstrap-duallistbox.min.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin-ext/wang-editor/wangEditor-3.0.10/release/wangEditor.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin-ext/iframe-tabs/content.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/AdminLTE/dist/css/skins/skin-purple-light.min.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/AdminLTE/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/laravel-admin/laravel-admin.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/nprogress/nprogress.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/sweetalert2/dist/sweetalert2.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/nestable/nestable.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/toastr/build/toastr.min.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/bootstrap3-editable/css/bootstrap-editable.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/google-fonts/fonts.css">
    <link rel="stylesheet" href="http://yueliao.cheyakeji.com/vendor/laravel-admin/AdminLTE/dist/css/AdminLTE.min.css">


    <script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/AdminLTE/plugins/jQuery/jQuery-2.1.4.min.js"></script>
    <script src="http://yueliao.cheyakeji.com/vendor/laravel-admin-ext/echarts/echarts.min.js"></script>
    <script src="http://yueliao.cheyakeji.com/vendor/laravel-admin-ext/echarts/draw.js"></script>

    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body class="hold-transition skin-purple-light fixed">


<div class="wrapper">

    <!--No header-->
    <!--No sidebar-->
    <div class="content-wrapper" id="pjax-container">
        <style type="text/css"> .column-selector { margin-right: 10px; } .column-selector .dropdown-menu { padding: 10px; height: auto; max-height: 500px; overflow-x: hidden; } .column-selector .dropdown-menu ul { padding: 0; } .column-selector .dropdown-menu ul li { margin: 0; } .column-selector .dropdown-menu label { width: 100%; padding: 3px; } </style>

        <div id="app">
            <section class="content-header">
                <h1>
                    用户消费统计
                    <small> </small>
                </h1>

                <!-- breadcrumb start -->
                <ol class="breadcrumb" style="margin-right: 30px;">
                    <li><a href="http://admin.hudongailian.com"><i class="fa fa-dashboard"></i>Home</a></li>
                </ol>

                <!-- breadcrumb end -->

            </section>

            <section class="content">
                <div class="row"><div class="col-md-12"><div class="box grid-box">
                            <div class="box-header with-border">
                                <div class="pull-right">
                                    <div class="dropdown pull-right column-selector">
                                        <button type="button" class="btn btn-sm btn-instagram dropdown-toggle" data-toggle="dropdown">
                                            <i class="fa fa-table"></i>
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu" role="menu">
                                            <li>
                                                <ul>
                                                    <li class="checkbox icheck">
                                                        <label>
                                                            <input type="number" class="column-select-item" value="user_id">用户ID
                                                        </label>
                                                    </li>

                                                    <li class="checkbox icheck">
                                                        <label>
                                                            <input type="checkbox" class="column-select-item" value="video_consume" checked>视频通话消费（占比）
                                                        </label>
                                                    </li>

                                                    <li class="checkbox icheck">
                                                        <label>
                                                            <input type="checkbox" class="column-select-item" value="voice_consume" checked>语音通话消费（占比）
                                                        </label>
                                                    </li>

                                                    <li class="checkbox icheck">
                                                        <label>
                                                            <input type="checkbox" class="column-select-item" value="gift_consume" checked>礼物消费（占比）
                                                        </label>
                                                    </li>

                                                    <li class="checkbox icheck">
                                                        <label>
                                                            <input type="checkbox" class="column-select-item" value="msg_consume" checked>私信消费（占比）
                                                        </label>
                                                    </li>

                                                    <li class="checkbox icheck">
                                                        <label>
                                                            <input type="checkbox" class="column-select-item" value="other_consume" checked>其他消费（占比）
                                                        </label>
                                                    </li>
                                                </ul>
                                            </li>
                                            <li class="divider">
                                            </li><li class="text-right">
                                                <button class="btn btn-sm btn-default column-select-all">全部</button>
                                                <button class="btn btn-sm btn-primary column-select-submit">提交</button>
                                            </li>
                                        </ul>
                                    </div>


                                </div>
                                <div class="pull-left">
                                    <div class="btn-group" style="margin-right: 5px" data-toggle="buttons">
                                        <label class="btn btn-sm btn-dropbox 6422c543ef6ea-filter-btn active" title="筛选">
                                            <input type="checkbox"><i class="fa fa-filter"></i><span class="hidden-xs">筛选</span>
                                        </label>
                                    </div>
                                </div>
                            </div>

                            <div class="box-header with-border  filter-box" id="filter-box">
                                <form action="/consume_statistics" class="form-horizontal" pjax-container method="get">
                                    <div class="row">
                                        <div class="col-md-4">
                                            <div class="box-body">
                                                <div class="fields-group">
                                                    <div class="form-group">
                                                        <label class="col-sm-2 control-label">用户ID</label>
                                                        <div class="col-sm-8">
                                                            <div class="input-group input-group-sm">
                                                                <input type="text" class="form-control" id="user_id" placeholder="用户ID" name="user_id" value="{{$_GET['user_id'] ?? 0}}">
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-4">
                                            <div class="box-body">
                                                <div class="fields-group">
                                                </div>
                                            </div>
                                        </div>

                                    </div>
                                    <!-- /.box-body -->

                                    <div class="box-footer">
                                        <div class="row">
                                            <div class="col-md-4">
                                                <div class="col-md-2"></div>
                                                <div class="col-md-8">
                                                    <div class="btn-group pull-left">
                                                        <button class="btn btn-info submit btn-sm"><i class="fa fa-search"></i>搜索</button>
                                                    </div>
                                                    <div class="btn-group pull-left " style="margin-left: 10px;">
                                                        <a href="/consume_statistics" class="btn btn-default btn-sm"><i class="fa fa-undo"></i>重置</a>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                </form>
                            </div>

                            <!-- /.box-header -->
                            <div class="box-body table-responsive no-padding">
                                <table class="table table-hover grid-table" id="grid-table6422c543e0d20">
                                    <thead>
                                    <tr>
                                        <th class="column-video_consume">用户ID</th>
                                        <th class="column-video_consume">视频通话消费（占比）</th>
                                        <th class="column-voice_consume">语音通话消费（占比）</th>
                                        <th class="column-gift_consume">礼物消费（占比）</th>
                                        <th class="column-msg_consume">私信消费（占比）</th>
                                        <th class="column-other_consume">其他消费（占比）</th>
                                    </tr>
                                    </thead>

                                    <tbody>
                                        @if(count($info))
                                        <tr data-key="529">
                                            <td class="column-channel">
                                                {{$info['user_id'] ?? ''}}
                                            </td>
                                            <td class="column-channel">
                                                {{$info['video'] ?? ''}}（{{$info['video'] ?  round($info['video'] / $info['total'], 3) * 100 : 0}}%）
                                            </td>
                                            <td class="column-video_consume">
                                                {{$info['voice'] ?? ''}}（{{$info['voice'] ?  round($info['voice'] / $info['total'], 3) * 100 : 0}}%）
                                            </td>
                                            <td class="column-voice_consume">
                                                {{$info['gift'] ?? ''}}（{{$info['gift'] ?  round($info['gift'] / $info['total'], 3) * 100 : 0}}%）
                                            </td>
                                            <td class="column-gift_consume">
                                                {{$info['message'] ?? ''}}（{{$info['message'] ?  round($info['message'] / $info['total'], 3) * 100 : 0}}%）
                                            </td>
                                            <td class="column-msg_consume">
                                                {{$info['other'] ?? ''}}（{{$info['other'] ?  round($info['other'] / $info['total'], 3) * 100 : 0}}%）
                                            </td>
                                        </tr>
                                        @endif
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.box-body -->
                        </div></div></div>

            </section>
        </div>
        <script data-exec-on-popstate>$(function () {
                var _ifraem_id_ = '';

                var _pjax = '';

                var _list_ifraem_id_ = '';

                var _list_after_save_ = '';

                var layer_size = window.layer_size || '1100px,98%';

                var bind_urls = window.bind_urls || top.bind_urls;

                var bind_selecter = window.bind_selecter || top.bind_selecter;

                window.Pops = [];

                if (_list_ifraem_id_ && !_list_after_save_)
                {
                    var iframes = top.document.getElementsByTagName("iframe");
                    for(var i in iframes)
                    {
                        if (iframes[i].id == _list_ifraem_id_)
                        {
                            var openner = iframes[i].contentWindow;

                            openner.$.pjax.reload('#pjax-container');

                            if (bind_urls =='new_tab')
                            {
                                var tab_id = getCurrentId();
                                if(tab_id)
                                {
                                    top.toastr.success('success');
                                    top.closeTabByPageId(tab_id.replace(/^iframe_/i, ''));
                                    doStop();
                                }
                            }
                            else if (bind_urls =='popup')
                            {
                                var index = parent.layer.getFrameIndex(window.name);
                                if(index)
                                {
                                    top.toastr.success('success');
                                    parent.layer.close(index);
                                    doStop();
                                }
                            }

                            break;
                        }
                    }
                    return;
                }

                if(_ifraem_id_ && $('form').size())
                {
                    $('form').append('<input type="hidden" name="_ifraem_id_" value="' + _ifraem_id_ + '" />');
                }

                if(!_pjax)
                {
                    $('body').addClass('iframe-content');

                    if($('#terminal-box').size())
                    {
                        // fix laravel-admin-extensions/helpers terminal
                        $(window).load(function(){
                            $('#terminal-box,.slimScrollDiv').css({
                                height: $('#pjax-container').height() - 247 +'px'
                            });
                        });
                    }

                    $('body').on('click', '.breadcrumb li a', function() {
                        var url = $(this).attr('href');
                        if (url == top.iframes_index) {
                            top.addTabs({
                                id: '_admin_dashboard',
                                title: top.home_title,
                                close: false,
                                url: url,
                                urlType: 'absolute',
                                icon: '<i class="fa ' + top.home_icon + '"></i>'
                            });
                            return false;
                        }
                    });

                    if ((bind_urls =='new_tab' || bind_urls =='popup') && bind_selecter)
                    {

                        $('body').on('click', bind_selecter, function() {
                            var url = $(this).attr('href');
                            if (!url || url == '#' || /^javascript|\(|\)/i.test(url)) {
                                return;
                            }

                            if ($(this).attr('target') == '_blank') {
                                return;
                            }

                            if ($(this).hasClass('iframes-pass-url')) {
                                return;
                            }

                            var icon = '<i class="fa fa-file-text"></i>';
                            if ($(this).find('i.fa').size()) {
                                icon = $(this).find('i.fa').prop("outerHTML");
                            }

                            var title = ($(this).text() || $(this).attr('title') || '').trim();

                            var tab_id = getCurrentId();

                            if(!tab_id)
                            {
                                // return true;
                            }

                            url += (url.indexOf('?')>-1? '&':'?') + '_ifraem_id_=' + tab_id;

                            tab_id = tab_id.replace(/^iframe_(.+)$/ ,'$1');

                            var tab = top.findTabTitle(tab_id);

                            if (!tab)
                            {
                                //return true;
                            }

                            if(tab)
                            {
                                title = ' ' + tab.text() + (title ? '-' + title : '');
                            }

                            if(bind_urls == 'popup')
                            {
                                var area = layer_size.split(',');
                                var popw = $(this).attr('popw');
                                var poph = $(this).attr('poph');
                                if(popw && poph)
                                {
                                    area = [popw, poph];
                                }
                                openPop(url, icon + title, area);
                            }
                            else
                            {
                                top.openTab(url, title || '*', icon);
                            }

                            var toggle = false;
                            if ($(this).parents('.grid-dropdown-actions').size() && (toggle = $(this).parents('.grid-dropdown-actions').find('.dropdown-toggle'))) {
                                toggle.trigger('click');
                            }

                            return false;
                        });
                    }

                    window.getCurrentId = function()
                    {
                        var iframes = top.document.getElementsByTagName("iframe");
                        for(var i in iframes)
                        {
                            if (iframes[i].contentWindow == window)
                            {
                                return '' + iframes[i].id;
                            }
                        }
                        return '';
                    }

                    window.doStop = function()
                    {
                        if(!!(window.attachEvent && !window.opera)){
                            document.execCommand("stop");
                        }
                        else {
                            window.stop();
                        }
                    }

                    window.openPop = function(url, title ,area) {
                        if (!area) {
                            area = ['100%', '100%'];
                        }
                        var index = layer.open({
                            content: url,
                            type: 2,
                            title: title,
                            anim: 2,
                            closeBtn: 1,
                            shade: false,
                            area: area,
                        });

                        window.Pops.push(index);

                        return index;
                    }

                    window.closePop = function()
                    {
                        var index = parent.layer.getFrameIndex(window.name);
                        parent.layer.close(index);
                    }

                    window.closeTab = function()
                    {
                        var tab_id = getCurrentId();
                        if(tab_id)
                        {
                            top.closeTabByPageId(tab_id.replace(/^iframe_/i, ''));
                            doStop();
                        }
                    }
                }  ;(function () {
                    $('.column-select-submit').on('click', function () {

                        var defaults = ["dt","channel","video_consume","voice_consume","gift_consume","msg_consume","other_consume"];
                        var selected = [];

                        $('.column-select-item:checked').each(function () {
                            selected.push($(this).val());
                        });

                        if (selected.length == 0) {
                            return;
                        }

                        var url = new URL(location);

                        if (selected.sort().toString() == defaults.sort().toString()) {
                            url.searchParams.delete('_columns_');
                        } else {
                            url.searchParams.set('_columns_', selected.join());
                        }

                        $.pjax({container:'#pjax-container', url: url.toString()});
                    });

                    $('.column-select-all').on('click', function () {
                        $('.column-select-item').iCheck('check');
                        return false;
                    });

                    $('.column-select-item').iCheck({
                        checkboxClass:'icheckbox_minimal-blue'
                    });
                })();  ;(function () {
                    var $btn = $('.6422c543ef6ea-filter-btn');
                    var $filter = $('#filter-box');

                    $btn.unbind('click').click(function (e) {
                        if ($filter.is(':visible')) {
                            $filter.addClass('hide');
                        } else {
                            $filter.removeClass('hide');
                        }
                    });
                })();  $('#dt').datetimepicker({"format":"YYYY-MM-DD","locale":"zh-CN"});
                $('.grid-per-pager').on("change", function(e) {
                    $.pjax({url: this.value, container: '#pjax-container'});
                });
            });</script>


    </div>

    <!-- Main Footer -->
    <footer class="main-footer">
        <!-- To the right -->
        <div class="pull-right hidden-xs">
            <strong>Env</strong>&nbsp;&nbsp; dev

            &nbsp;&nbsp;&nbsp;&nbsp;

            <strong>Version</strong>&nbsp;&nbsp; 1.8.17

        </div>
        <!-- Default to the left -->
        <strong>Powered by <a href="https://github.com/z-song/laravel-admin" target="_blank">laravel-admin</a></strong>
    </footer>
</div>

<button id="totop" title="Go to top" style="display: none;"><i class="fa fa-chevron-up"></i></button>

{{--<script>--}}
{{--    function LA() {}--}}
{{--    LA.token = "Vqg75bLQNpPRgST6cIVg6oBbGdT6BscJ3FLci3ej";--}}
{{--    LA.user = {"id":36,"username":"kexin","name":"\u53ef\u946b","avatar":"http:\/\/admin.hudongailian.com\/vendor\/laravel-admin\/AdminLTE\/dist\/img\/user2-160x160.jpg"};--}}
{{--</script>--}}

<!-- REQUIRED JS SCRIPTS -->
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/AdminLTE/bootstrap/js/bootstrap.min.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/AdminLTE/plugins/slimScroll/jquery.slimscroll.min.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/AdminLTE/dist/js/app.min.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/jquery-pjax/jquery.pjax.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/nprogress/nprogress.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/nestable/jquery.nestable.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/toastr/build/toastr.min.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/bootstrap3-editable/js/bootstrap-editable.min.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/sweetalert2/dist/sweetalert2.min.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/laravel-admin/laravel-admin.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin-ext/iframe-tabs/bootstrap-tab.js"></script>
<script src="http://yueliao.cheyakeji.com/js/lightbox2/js/lightbox.min.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/AdminLTE/plugins/iCheck/icheck.min.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/AdminLTE/plugins/colorpicker/bootstrap-colorpicker.min.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/AdminLTE/plugins/input-mask/jquery.inputmask.bundle.min.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/moment/min/moment-with-locales.min.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/flatpickr/dist/flatpickr.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/flatpickr/dist/shortcut-buttons-flatpickr/shortcut-buttons-flatpickr.min.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/flatpickr/dist/l10n/zh.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/bootstrap-fileinput/js/plugins/canvas-to-blob.min.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/bootstrap-fileinput/js/fileinput.min.js?v=4.5.2"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/AdminLTE/plugins/select2/select2.full.min.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/number-input/bootstrap-number-input.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/AdminLTE/plugins/ionslider/ion.rangeSlider.min.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/bootstrap-switch/dist/js/bootstrap-switch.min.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/fontawesome-iconpicker/dist/js/fontawesome-iconpicker.min.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/bootstrap-fileinput/js/plugins/sortable.min.js?v=4.5.2"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin/bootstrap-duallistbox/dist/jquery.bootstrap-duallistbox.min.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/ueditor/ueditor.config.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/ueditor/ueditor.all.js"></script>
<script src="http://yueliao.cheyakeji.com/vendor/laravel-admin-ext/wang-editor/wangEditor-3.0.10/release/wangEditor.js"></script>


</body>
</html>
